<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewpor" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="./vue.global.js"></script>
</head>

<body>
    <div id="app">
        <!-- 部署子组件 -->
        <alert-box>
            <!-- 将自定义的DOM结构 插入子组件的插槽中 -->
            <h3>快别吃鸡了!</h3>
            <h1>你老婆跟人跑啦！！！！</h1>
        </alert-box>
    </div>

    <script>
        const app = Vue.createApp({

        })

        app.component("alert-box",{
            template:`
            <div class="alert-box">
                <strong>Error!!!</strong>
                <h1>Error的详情</h1>

                <!-- 预留一个插槽 用于接收父组件注入的DOM结构 -->
                <slot></slot>
            </div>
            `
        })
        
        app.mount('#app')
    </script>
</body>

</html>